<?php

namespace frontend\models;

use Yii;

/**
 * This is the model class for table "me_categorys".
 *
 * @property integer $id
 * @property string $name
 * @property string $pid
 * @property integer $is_del
 * @property string $description
 */
class Categorys extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'me_categorys';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['name'], 'required'],
            [['is_del'], 'integer'],
            [['name'], 'string', 'max' => 30],
            [['pid'], 'string', 'max' => 300],
            [['description'], 'string', 'max' => 100],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => '主键',
            'name' => '名称',
            'pid' => '描述',
            'is_del' => '是否删除默认0公开',
            'description' => '分类说明',
        ];
    }
}
